﻿/* 12. Write a program that creates an array containing all letters from the alphabet (A-Z). 
 * Read a word from the console and print the index of each of its letters in the array. */

using System;

public class IndexOfLettersOfWord
{
    public static void Main()
    {
        char[] alphabet = new char[26];
        string word;
        int letter;

        for (int i = 0; i < 26; i++)
            alphabet[i] = (char)(65 + i);

        Console.Write("\nThe word is: ");
        word = Console.ReadLine();

        Console.WriteLine();
        for (int i = 0; i < word.Length; i++)
        {
            letter = (int)word[i] - 65;
            if (letter > 25)
                letter -= 32;

            Console.WriteLine("{0} : {1}", word[i], letter);
        }

        Console.WriteLine();
    }
}